﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;
using YasharEl.Infrastructure.Core.Users;

namespace YasharEl.Infrastructure.Core.DomainModel.Users
{
    [ContractClass(typeof(UsersCatalogContract))]
    public interface IUsersCatalog
    {
        IUser FindUserByIdentityNumber(long userIdentityNumber);
    }

    [ContractClassFor(typeof(IUsersCatalog))]
    internal abstract class UsersCatalogContract : IUsersCatalog
    {
        public IUser FindUserByIdentityNumber(long userIdentityNumber)
        {
            Contract.Requires<ArgumentNullException>(userIdentityNumber > 0, "user identity number must be valid numeric identifier.");

            return default(IUser);
        }
    }
}
